Learn R Programming

Directional (version 4.0)

Density of some circular distributions: Density of some circular distributions

Description

Density of some circular distributions.

Usage

vm.density(x, m, k, rads = FALSE, logden = FALSE)
spml.density(x, mu, rads = FALSE, logden = FALSE)
wrapcauchy.density(x, m, rho, rads = FALSE, logden = FALSE)
circpurka.density(x, m, a, rads = FALSE, logden = FALSE)

Arguments

x

A vector with circular data.

m

The mean value, a scalar. This is the median for the circular Purkayastha distribution.

mu

The mean vector, a vector with two values.

k

The concentration parameter.

rho

The \(rho\) parameter of the wrapped Cauchy distribution.

a

The \(alpha\) parameter of the circular Purkayastha distribution.

rads

If the data are in rads, then this should be TRUE, otherwise FALSE.

logden

If you the logarithm of the density values set this to TRUE.

Value

A vector with the (log) density values of x.

Details

The density of the von Mises, bivariate projected normal, wrapped Cauchy or the circular Purkayastha distributions is computed.

References

Mardia, K. V. and Jupp, P. E. (2000). Directional statistics. Chicester: John Wiley & Sons.

See Also

kent.density, rvonmises, ESAGdensity

Examples

Run this code
# NOT RUN {
x <- rvonmises(500, m = 2.5, k = 10, rads = TRUE)
mod <- circ.summary(x, rads = TRUE, plot = FALSE)
den <- vm.density(x, mod$mesos, mod$kappa, rads = TRUE, logden = TRUE )
mod$loglik
sum(den)
# }

Run the code above in your browser using DataLab